home *** CD-ROM | disk | FTP | other *** search
/ Star Festival... a Return to Japan / Star Festival... a Return to Japan.iso / pc / STARFESTIVAL / Shared.Cst / 00067_navSwitch.ls < prev    next >
Encoding:
Text File  |  1999-10-10  |  2.3 KB  |  90 lines

  1. on returnSwitch theSound
  2.   
  3.   set channel = the clickon
  4.   puppetsprite channel, true
  5.   if theSound <> "none" then
  6.     puppetSound theSound
  7.   end if
  8.   set the blend of sprite channel = 60
  9.   updateStage
  10.   --see navswitch, below
  11.   --  repeat while soundBusy(1)
  12.   --  end repeat
  13.   --  puppetSound (0)
  14.   repeat while the mousedown
  15.   end repeat
  16.   set the blend of sprite channel = 20
  17.   updateStage
  18.   puppetsprite channel, false
  19.   
  20. end returnSwitch
  21.  
  22. -------------------------------------------------------------------
  23.  
  24. on navSwitch theSound
  25.   
  26.   set channel = the clickon
  27.   puppetsprite channel, true
  28.   if theSound <> "none" then
  29.     puppetSound 1 theSound
  30.   end if
  31.   set the blend of sprite channel = 60
  32.   updateStage
  33.   --some sounds seem to spontaneously loop in Dir 7, so 
  34.   --this repeat/puppet(0) is commented out.
  35.   --  repeat while soundBusy(1)
  36.   --  end repeat
  37.   --  puppetSound (0)
  38.   repeat while the mousedown
  39.     nothing
  40.   end repeat
  41.   set the blend of sprite channel = 20
  42.   updateStage
  43.   puppetsprite channel, false
  44.   
  45. end navSwitch 
  46. ------------------------------------------------------------------------
  47.  
  48. on quickSwitch theSound
  49.   
  50.   -- assign the sprite channel where the mouse click occured
  51.   set channel = the clickOn
  52.   
  53.   -- make the sprite a puppet, contolled by this lingo
  54.   puppetsprite channel, true
  55.   
  56.   -- check to see if passed argument
  57.   if theSound <> "none" then
  58.     -- make the sound channel a puppet, overriding any sound in the 
  59.     --  sound channel of the score and play the arg castmember sound
  60.     puppetSound theSound
  61.   end if
  62.   
  63.   -- set the puppet to a cast member with the name of the puppet concat 'B'  
  64.   set theCast = the name of cast( the castNum of sprite channel )
  65.   set the castNum of sprite channel to (the number of cast(theCast & "B"))
  66.   updateStage
  67.   
  68.   --see navswitch comment
  69.   -- loop during the time sound plays in channel 1
  70.   -- repeat while soundBusy(1)
  71.   -- end repeat
  72.   
  73.   -- stop sound from playing
  74.   --puppetSound (0)
  75.   
  76.   -- ignore multiple mouse downs
  77.   repeat while the stilldown
  78.   end repeat
  79.   
  80.   -- reset the puppet to its original cast number
  81.   set the castNum of sprite channel to ( the number of cast theCast )
  82.   updateStage
  83.   
  84.   -- make the sprite a nonpuppet, contolled by the score
  85.   puppetsprite channel, false
  86.   
  87. end quickSwitch
  88.  
  89. ------------------------------------------------------------------------
  90.